#!/bin/bash
echo '============================='
echo '===== INSTALL MEMCACHED ====='
echo '============================='

read -p "Please INPUT The Number 1 or 2 => " key

libevent() {
   yum -y install libevent-devel
}

memcached() {
   tar xvf memcached-1.5.8.tar.gz
   cd memcached-1.5.8
   ./configure --prefix=/usr/local/memcached
   make && make install
}

case $key in
    1)
	libevent
    ;;
    2)
	memcached
    ;;
esac
